<%-- // // This file is part of the OpenNMS(R) Application. // // OpenNMS(R) is Copyright (C) 2002-2003 The OpenNMS Group, Inc. All rights reserved. // OpenNMS(R) is a derivative work, containing both original code, included code and modified // code that was published under the GNU General Public License. Copyrights for modified // and included code are below. // // OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc. // // Modifications: // // 2009 Jul 22: Display important events on start page -- r.trommer@open-factory.org // // Copyright (C) 1999-2001 Oculan Corp. All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // For more information contact: // OpenNMS Licensing // http://www.opennms.org/ // http://www.opennms.com/ // --%> <%-- This page is included by other JSPs to create a table containing a row for each event passed in. This page has one required parameter: node, a node identifier. Without this parameter, this page will throw a ServletException. It expects that a tag has been set in the including page that directs all URLs to be relative to the servlet context. --%> <%@page import="org.opennms.web.alarm.AlarmFactory"%> <%@page language="java" contentType="text/html" session="true" %> <%@page import="org.opennms.web.filter.Filter" %> <%@page import="org.opennms.web.alarm.Alarm" %> <%@page import="org.opennms.web.alarm.SortStyle" %> <%@page import="org.opennms.web.alarm.AcknowledgeType" %> <%@page import="org.opennms.web.alarm.filter.ExactUEIFilter" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <% int throttle = 5; String header = "Outage Alarms (newest " + 3*throttle + ")"; int offset = 0; //sort by event id SortStyle sortStyle = SortStyle.ID; //include only unacknowledged (outstanding) events AcknowledgeType ackType = AcknowledgeType.UNACKNOWLEDGED; //Implement a second severity filter org.opennms.web.filter.Filter[] nodeDownFilters = new org.opennms.web.filter.Filter[1]; org.opennms.web.filter.Filter[] ifDownFilters = new org.opennms.web.filter.Filter[1]; org.opennms.web.filter.Filter[] svcDownFilters = new org.opennms.web.filter.Filter[1]; nodeDownFilters[0] = new ExactUEIFilter("uei.opennms.org/nodes/nodeDown"); ifDownFilters[0] = new ExactUEIFilter("uei.opennms.org/nodes/interfaceDown"); svcDownFilters[0] = new ExactUEIFilter("uei.opennms.org/nodes/nodeLostService"); Alarm[] alarmNodeDowns = AlarmFactory.getAlarms(sortStyle, ackType, nodeDownFilters, throttle, offset); Alarm[] alarmIfDowns = AlarmFactory.getAlarms(sortStyle, ackType, ifDownFilters, throttle, offset); Alarm[] alarmSvcDowns = AlarmFactory.getAlarms(sortStyle, ackType, svcDownFilters, throttle, offset); %>

<%=header%>

<% if (alarmNodeDowns.length != 0 || alarmIfDowns.length != 0 || alarmSvcDowns.length != 0) { for (Alarm alarm : alarmNodeDowns) { %> <% } for (Alarm alarm : alarmIfDowns) { %> <% } for (Alarm alarm : alarmSvcDowns) { %> <% } %> <% } else { %> <% } %>

"/>" ><%=alarm.getNodeLabel()%>

"/>" ><%=alarm.getNodeLabel()%>

"/>" ><%=alarm.getNodeLabel()%>
all unacknowledged alarms ...
There are no current alarm outages